#ifndef __THREAD_POOL_H
#define __THREAD_POOL_H
#include <mutex>
#include <condition_variable>
#include <queue>
#include <thread>
#include <functional>

class ThreadPool{
public:
    explicit ThreadPool(size_t num = 4){

    }

    ThreadPool() = default;
    ThreadPool(const ThreadPool &&) = default;


private:
    struct Pool{
        std::mutex mtx;
        std::condition_variable cond;
        bool isClose;
        std::queue<std::function<void()> > tasks;
    };
private:
    std::shared_ptr<Pool> m_pool;
};


#endif